package com.woniu.adapter;

import com.woniu.outlet.dao.ProjectPoMapper;
import com.woniu.outlet.po.ProjectPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

@Component
public class ProjectAdapter {
    @Autowired
    private ProjectPoMapper projectPoMapper;

    public String getProjectCode(Integer id){
        ProjectPo projectPo = projectPoMapper.selectByPrimaryKey(id);
        if(StringUtils.isEmpty(projectPo)){
            return "没有该产品";
        }
        return projectPo.getProjectCocde();
    }
}
